<template>
	<view>
		<web-view :src="playerUrl"></web-view>
	</view>
</template>

<script>
	import {
		findHideVideo,
	} from '@/api/index.js'
	export default {
		data() {
			return {
				type: '',
				playerUrl: ''
			}
		},
		onLoad(OPTIONS) {
            // 查询隐藏视频,0:隐藏,1:显示
            findHideVideo().then((res)=>{
                if(res.data == 0){
                    uni.switchTab({
                        url: '/pages/health/index'
                    })
                }else{
                    this.type = OPTIONS.type
                    if (this.type == 'exhale') {
                        this.playerUrl = 'https://www.andefly.com/player.html?id=f0d7decdccc271efbb174710b4ba0102'
                    } else if (this.type == 'rer') {
                        this.playerUrl = 'https://www.andefly.com/player.html?id=4022ceb3ccc171efa56a7511978f0102'
                    }
                }
            })
		}
	}
</script>

<style>
</style>